<script>
// 顶部tab+页面切换
import { defineComponent } from 'vue'
export default defineComponent({
	name: 'WeworkQr'
})
</script>
<script setup>
import {
		ref
} from 'vue'
import { toRaw } from '@vue/reactivity';
import Pic from './pic.vue'
import Video from './video.vue'
const dialogVisible = ref(false)
const module = ref('Pic')
const editQr = ref(null)
const showEdit = (val) => {
	if (val) {
		editQr.value.show(toRaw(val).id)
	}
	dialogVisible.value = true
}
</script>
<template>
	<div>
		<div v-if="!dialogVisible">
		<div class="app-tab app-tab-margin-top">
			<div @click="module='Pic'" :class="module=='Pic'?'app-tab-item-active':'app-tab-item'">
				图片
			</div>
			<div @click="module='Video'" :class="module=='Video'?'app-tab-item-active':'app-tab-item'">
				视频
			</div>
		</div>
		<Pic v-if="module=='Pic'" @showEditQr="showEdit" />
		<Video v-else />
		</div>
	</div>
</template>
<style lang="scss">
	@import url('../../../style/app-component.scss');
	@import '../../../style/mixin.scss';
</style>